<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>查询</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<script type="text/javascript" src="js/jquery-1.8.0.min.js"></script>
	<script type="text/javascript">
		//转合同
		function zhuanht(id){
			var url="<%=path%>/reserveHour/reserveConverHt?orderId="+id;
			window.location.href=url;
		}
	</script>
  </head>
  
  <body>
  		<table>
  			<tr>
  				<td>
  					<a 	href="reserveHour/queryReserve?reserveHour.reserveState=">全部</a>
  					<a 	href="reserveHour/queryReserve?reserveHour.reserveState=1">已预约</a>
  					<a  href="reserveHour/queryReserve?reserveHour.reserveState=2">已完成</a>
  					<a  href="reserveHour/queryReserve?reserveHour.reserveState=0">已取消</a>
  				</td>
  			</tr>
  			<c:forEach items="${hours }" var="hour">
  				<tr>
  					<td>${hour.reserveNo }</td>
  					<td>${hour.carType }</td>
  					<td>${hour.carNum }</td>
  					<td>${hour.infoframcode }</td>
  					<td>
  					</td>
  					
  					<td>
  						<c:if test="${hour.reserveState==1 }">
  							<a href="javascript:void(0);" onclick="zhuanht(${hour.id});">转合同</a>
  						</c:if>
  						<c:if test="${hour.reserveState==2}">
  							已完成
  						</c:if>
  					</td>
  				</tr>
  			</c:forEach>
  		</table>
  </body>
</html>
